02/05/2022

What is ReLTER

ReLTER is an R package that: provides access to DEIMS-SDR, allows interact with software implemented by eLTER Research Infrastructure (RI) and improves the data/information shared by them.

ReLTER is born within eLTER-Plus H2020 project and it shall definitely follow the progress of (eLTER RI).

ReLTER passed the peer review of ROpenSci, the biggest R community for open tools and open science.

# Convenient way to load list of packages
pkg_list <- c("sf", "terra", "ReLTER", "tmap")
lapply(pkg_list,require, character.only = TRUE)
tmap_options(check.and.fix = TRUE)
tmap_mode("view")

How to pronounce ReLTER

riːˈɛl-tiː-iː-ɑː

Audio

How to cite ReLTER

citation("ReLTER")

## To cite the 'ReLTER' package in publications use:
##
##   Alessandro Oggioni, Micha Silver, Luigi Ranghetti & Paolo Tagliolato.
##   (2021). oggioniale/ReLTER: ReLTER v1.1.0 (1.1.0). Zenodo.
##   https://doi.org/10.5281/zenodo.5576813
##
## A BibTeX entry for LaTeX users is
##
##   @software{alessandro_oggioni_2021_5576813,
##   author       = {Alessandro Oggioni and Micha Silver and
##                   Luigi Ranghetti and Paolo Tagliolato},
##   title        = {ropensci/ReLTER: ReLTER v1.1.0},
##   year         = 2022,
##   publisher    = {Zenodo},
##   version      = {1.1.0},
##   doi          = {10.5281/zenodo.5576813},
##   url          = {https://doi.org/10.5281/zenodo.5576813}
## }

Basic functions of ReLTER

ls("package:ReLTER")
##  [1] "%>%"                            "get_activity_info"             
##  [3] "get_dataset_info"               "get_ilter_envcharacts"         
##  [5] "get_ilter_generalinfo"          "get_ilter_parameters"          
##  [7] "get_ilter_research_topics"      "get_network_envcharacts"       
##  [9] "get_network_parameters"         "get_network_related_resources" 
## [11] "get_network_research_topics"    "get_network_sites"             
## [13] "get_site_info"                  "get_site_ODS"                  
## [15] "get_sos_procedurelist"          "produce_network_points_map"    
## [17] "produce_site_map"               "produce_site_parameters_pie"   
## [19] "produce_site_parameters_waffle" "produce_site_qrcode"           
## [21] "taxon_id_pesi"                  "taxon_id_worms"

Getting help with ReLTER

Visit the ReLTER website:

docs.ropensci.org/ReLTER/ for further documentation, examples, and installation of the package.

The manual of ReLTER package is found here.

Reporting bugs and new feature requests

maintainer("ReLTER")
## [1] "The package maintainer Alessandro Oggioni, phD (2020) <oggioniale@gmail.com>"

Report bugs on the ROpenSci github issues page

(You need to be logged in to Github to add a new issue)

However:

Whenever reporting an issue or new feature request:

  • First search for similar issues
  • Post a Minimum Reproducible Example
  • Include the code and data that causes the error
  • Use the reprex package for this
  • Add your working environment: i.e. sessionInfo()

Examples:

Search for DEIMS ID for a site (1/5)

The function get_ilter_generalinfo() allows to search by country name and site name.

Then get_site_info() obtains various metadata about a chosen site.

For this example, the Doñana LTSER Platform in Spain

donana <- ReLTER::get_ilter_generalinfo(country_name = "Spain",
                              site_name = "Doñana")
donana_id = donana$uri

Plot a basic map of that site. We use the tmap package for viewing maps.

donana_polygon <- ReLTER::get_site_info(donana_id, category = "Boundaries")
tm_basemap("OpenStreetMap.Mapnik") +
  tm_shape(donana_polygon) +
  tm_fill(col = "blue", alpha = 0.3)

Retrieve metadata about a particular site (2/5)

This example retrieves metadata from Lock Kinord in Scotland.

loch_kinord <- ReLTER::get_ilter_generalinfo(country_name = "United K",
                              site_name = "Loch Kinord")
(loch_kinord_id = loch_kinord$uri)
## [1] "https://deims.org/9fa171d2-5a24-40d3-9c06-b3f9e9d0f270"
loch_kinord_details <- ReLTER::get_site_info(loch_kinord_id,
                                 c("Contacts", "EnvCharacts", "Parameters"))

print(paste("Site manager:",
            loch_kinord_details$generalInfo.siteManager[[1]]['name'],
            loch_kinord_details$generalInfo.siteManager[[1]]['email']))
## [1] "Site manager: Andrew Sier [Primary ECN contact] arjs@ceh.ac.uk"

# Metadata contact:
(loch_kinord_details$generalInfo.metadataProvider[[1]]['name'])
##                                name
## 1 Andrew Sier [Primary ECN contact]
## 2                    Caroline Dilks
print(paste("Average air temperature:",
            loch_kinord_details$envCharacteristics.airTemperature.avg))
## [1] "Average air temperature: 6.62"
print(paste("Annual precipitation:",
            loch_kinord_details$envCharacteristics.precipitation.annual))
## [1] "Annual precipitation: 1031.3"

print(paste("GeoBonBiome:",
            loch_kinord_details$envCharacteristics.geoBonBiome[[1]]))
## [1] "GeoBonBiome: Fresh water lakes"
# Parameters:
head(loch_kinord_details$parameter[[1]]['parameterLabel'], 12)
##                       parameterLabel
## 1                   ammonium content
## 2    benthic invertebrates abundance
## 3     benthic invertebrates presence
## 4                       conductivity
## 5                 dissolved nutrient
## 6  dissolved organic carbon in water
## 7                ecosystem parameter
## 8         inorganic nutrient content
## 9                         lake level
## 10                  lake temperature
## 11                  nitrogen content
## 12                 species abundance

Query a network (3/5)

The LTER network in Slovakia

lter_slovakia_id = "https://deims.org/networks/3d6a8d72-9f86-4082-ad56-a361b4cdc8a0"
network_research_topics <- get_network_research_topics(lter_slovakia_id)

The list of research topics collected by Slovakia LTER network are:

head(network_research_topics$researchTopicsLabel, 20)
##  [1] "animal ecology"      "biodiversity"        "biology"            
##  [4] "climate change"      "climate monitoring"  "climatology"        
##  [7] "community dynamics"  "community ecology"   "ecology"            
## [10] "ecosystem ecology"   "ecosystem function"  "ecosystem service"  
## [13] "forest ecology"      "history"             "land use history"   
## [16] "meteorology"         "phenology"           "plant ecology"      
## [19] "population dynamics" "population ecology"

lter_slovakia_sites <- get_network_sites(lter_slovakia_id)

The list of the sites in Slovakia LTER network are:

lter_slovakia_sites$title
## [1] "Bab - Slovakia"                                            
## [2] "Jalovecka dolina - Slovakia"                               
## [3] "Kralova hola - Slovakia"                                   
## [4] "Kremnicke vrchy Ecological Experimental Station - Slovakia"
## [5] "Polana Biosphere Reserve (Hukavsky grun) - Slovakia"       
## [6] "Poloniny National Park LTSER - Slovakia"                   
## [7] "Tatra National Park - Slovakia"                            
## [8] "Tatras - alpine summits - Slovakia"                        
## [9] "Trnava LTSER - Slovakia"

Show map of sites in the network

lter_slovakia <- produce_network_points_map(lter_slovakia_id, "SVK")
svk <- readRDS("gadm36_SVK_0_sp.rds")  # downloaded by produce_network_points_map()
tm_basemap("OpenStreetMap.Mapnik") +
  tm_shape(lter_slovakia) +
  tm_dots(col = "blue", size=0.04) +
  tm_shape(svk) +
  tm_borders(col = "purple", lwd = 0.6) +
  tm_grid(alpha = 0.4) +
  tm_scale_bar(position = c("right", "bottom"))

Related resources (4/5)

The get_site_info function provides a list of related resources (e.g. datasets) shared by a site (e.g. Lake Maggiore)

tSiteRelatedResources <- ReLTER::get_site_info(
  deimsid = "https://deims.org/f30007c4-8a6e-4f11-ab87-569db54638fe",
  category = "RelateRes"
)
print(tSiteRelatedResources$relatedResources[[1]][c(2:5),])
##                                                     relatedResourcesTitle
## 2  Atmospheric deposition in Pallanza, Lake Maggiore watershed, 1980-2018
## 3            Phytoplankton_Biomass_Lake Maggiore_Ghiffa_station-1984-2018
## 4             Water chemistry of Lake Maggiore, Ghiffa station, 1988-2018
## 5 Transparency (Secchi depth) of Lake Maggiore, Ghiffa station, 1988-2018
##    relatedResourcesChanged
## 2 2020-12-13T20:06:48+0100
## 3 2020-12-16T10:46:15+0100
## 4 2021-11-03T06:10:14+0100
## 5 2022-02-16T11:36:32+0100
##                                                              uri
## 2 https://deims.org/dataset/0ce46362-0aab-482a-b1f0-a444a5dada39
## 3 https://deims.org/dataset/0ab8425a-d574-4575-8ba9-5275c607b0c5
## 4 https://deims.org/dataset/69564188-89de-4879-ad88-4aa97c1d005d
## 5 https://deims.org/dataset/e538c743-2149-49e3-9025-14a04ea7c90d

Map object of a site (5/5)

The produce_site_map function produces a map of the site boundaries, within a given country and network.

tmap::tmap_mode("plot")
# Example of Lake Maggiore site
sitesNetwork <- ReLTER::get_network_sites(
  networkDEIMSID = "https://deims.org/network/7fef6b73-e5cb-4cd2-b438-ed32eb1504b3"
)
# In the case of Italian sites are selected only true sites and excluded the
# macrosites.
sitesNetwork <- (sitesNetwork[!grepl('^IT', sitesNetwork$title),])
sf::st_crs(sitesNetwork) = 4326
siteMap <- ReLTER::produce_site_map(
  deimsid = "https://deims.org/f30007c4-8a6e-4f11-ab87-569db54638fe",
  countryCode = "ITA",
  listOfSites = sitesNetwork,
  gridNx = 0.7,
  gridNy = 0.35
)